<!DOCTYPE html>
<html>
<meta charset="utf-8">
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<body>

<div ng-app="myApp" ng-controller="sitesCtrl">
    <div ng-include="'sites.html'"></div>
</div>

<script>
var app = angular.module('myApp',[]);
app.controller('sitesCtrl', function ($scope, $http) {
    $http.get("./sites.php").then(function (response) {
        $scope.names = response.data.sites;
    });
});
</script>

<p>AngularJS 代码包含在“sites.html”文件中。</p>
</body>
</html>